
pkgname=python2-magic
pkgver=5.37
pkgrel=2
pkgdesc='Python bindings to the magic library.'
arch=('any')
url='https://darwinsys.com/file/'
license=('custom:unknown')
depends=('python2')
makedepends=('python2-setuptools')
source=("ftp://ftp.astron.com/pub/file/file-${pkgver}.tar.gz")
sha512sums=('bf153c15aebdd00329806231d20f295077b8b99efd0181d01279bcf3734a1718567df38cf75bc929eb8015ac98d29bb4bf1228d7ece8bfdfe14dd976391dd06d')

build() {
  cd "file-$pkgver/python"

  python2 setup.py build
}

package() {
  cd "file-$pkgver/python"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 "$srcdir/file-$pkgver/COPYING" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

